#ifndef WEATHER_H
#define WEATHER_H

#include <QWidget>
#include<QNetworkAccessManager>//网络连接管理
#include<QFileDialog>
#include<QIODevice>
#include<QNetworkRequest>
#include<QNetworkReply>
#include<QDebug>
#include<QJsonParseError>
#include<QJsonDocument>
#include<QJsonObject>
#include<QJsonValue>
#include<QMouseEvent>

namespace Ui {
class weather;
}

class weather : public QWidget
{
    Q_OBJECT

public:
    explicit weather(QWidget *parent = nullptr);
    ~weather();
    void replyFinished(QNetworkReply *rpl);
    void jsonanaly(QByteArray);
    void getreq();

private slots:
    void on_close_clicked();

    void on_min_clicked();

private:
    Ui::weather *ui;
    QNetworkAccessManager *manager;
    QString citystr;
    QString datestr;
    QString weekstr;
    QString weastr;
    QString temstr;
    QString temhighstr;
    QString temlowstr;
    QString win_vstr;
    QString winstr;
    QString win_speedstr;
    QPoint p;

protected:
    void mouseMoveEvent(QMouseEvent *e);
    void mousePressEvent(QMouseEvent *e);
};

#endif // WEATHER_H
